<template>
  <nav id="nav">
    <router-link to="/">Home</router-link> |
    <router-link to="/about/1">About 1</router-link> |
    <router-link to="/about/2">About 2</router-link>
  </nav>
  <div id="main">
    <RouterAlive />
  </div>
</template>

<script lang="ts" setup>
import RouterAlive from '../src/RouterAlive.vue'
</script>

<style lang="scss">
body,
html {
  width: 100%;
  height: 100%;
  margin: 0;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  color: #2c3e50;
  font-family: Avenir, Helvetica, Arial, sans-serif;
  text-align: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#nav {
  flex: none;
  padding: 30px;

  a {
    color: #2c3e50;
    font-weight: bold;

    &.router-link-exact-active {
      color: #42b983;
    }
  }
}

#main {
  position: relative;
  flex: 1 1 300px;
  overflow: auto;
}
</style>
